package PangModel;

import java.awt.*;

/**
 * Created by YILMAZ on 23/4/2015.
 */
public class MGBullet extends Bullet {

    public MGBullet()
    {
        imageID =ImageStore.IMAGE_MG_BULLET;
        tailImageID = ImageStore.IMAGE_NULL;
    }

    public void setDirection(int direction)
    {
        Point dir = new Point();
        if(direction == GameObject.MGBULLET_DIRECTION_RIGHT)
        {
            dir.setLocation(GameObject.UNIT_SPEED*GameObject.MGBULLET_SPEED_X, GameObject.UNIT_SPEED*GameObject.MGBULLET_SPEED_Y);
            setDirection(dir);
        }
        else if(direction == GameObject.MGBULLET_DIRECTION_LEFT)
        {
            dir.setLocation((-1)*GameObject.UNIT_SPEED*GameObject.MGBULLET_SPEED_X, GameObject.UNIT_SPEED*GameObject.MGBULLET_SPEED_Y);
            setDirection(dir);
        }
        // else throw exception
    }

}
